package cn.wolfcode.wolf2world.service;

import cn.wolfcode.wolf2world.domain.TravelComment;
import cn.wolfcode.wolf2world.query.TravelCommentQueryObject;
import org.springframework.data.domain.Page;
import org.springframework.util.StringUtils;

import java.util.List;

/**
 * @author 杨兴健
 * @Date 2020-08-16 22:14
 */
public interface TravelCommentService {
    void save(TravelComment travelComment);
    void update(TravelComment travelComment);
    void delete(String id);
    TravelComment get(String id);
    List<TravelComment> list();

    /**
     * 游记评论高级查询
     * @param qo 查询条件
     * @return
     */
    Page<TravelComment> query(TravelCommentQueryObject qo);

    /**
    * 新增或编辑游记评论
    * @param travelComment
    */
    void saveOrUpdate(TravelComment travelComment);

    /**
     * 根据游记id获取所有评论
     * @param travelId
     * @return
     */
    List<TravelComment> queryByTravelId(String travelId);
}
